package br.com.projeto.rulebusiness;

import java.util.List;

import br.com.projeto.dao.ProductDAO;
import br.com.projeto.databases.DAOFactory;
import br.com.projeto.entities.Product;

public class ProductRB {
	
	public static ProductDAO productDAO; 
	
	public ProductRB() {
		productDAO = DAOFactory.productDao();
	}
	
	public void saveProduct(Product product){
		productDAO.saveProduct(product);
	}
	
	public void updateProduct(Product product){
		productDAO.updateProduct(product);
	}
	
	public void deleteProduct(Product product){
		productDAO.deleteProduct(product);
	}
	
	public List<Product> listAllProducts(){
		return productDAO.listAllProducts();
	}
	
}
